<extend name="Index:base" />
<block name="title"><title>角色管理</title></block>
<block name="script">
	<script type="text/javascript">
		$(document).ready(function(){
			$('#collapseTwo').addClass('in');
			$('#collapseOne').removeClass('in');
			$('#myTab a:first').tab('show');
		});
	</script>
</block>
<block name="sidebar">
	<include file="Index:sidebar" />
</block>
<block name="content">
		<div id="content" class="col-sm-8">
			<ul class="nav nav-tabs" id="myTab">
			  <li><a href="#groupList" data-toggle="tab">角色列表</a></li>
			  <li><a href="#groupAdd" data-toggle="tab">添加角色</a></li>
			</ul>

			<!-- Tab panes -->
			<div class="tab-content">
			  <div class="tab-pane fade in active" id="groupList">
			  	<table class="table table-hover table-bordered table-condensed">
			  		<tr>
			  			<td>序号</td>
			  			<td>角色名称</td>
			  			<td>角色描述</td>
			  			<td>状态</td>
			  			<td>操作</td>
			  		</tr>
			  		<volist name="data" id="vo">
			  			<tr>
			  				<td>{$i+$num}</td>
			  				<td>{$vo['title']}</td>
			  				<td>{$vo['describe']}</td>
			  				<td><if condition="$vo['status'] eq 1"><span class="label label-success"><i class="glyphicon glyphicon-ok"></i></span>
								<else />
									<span class="label label-danger">							
									<i class="glyphicon glyphicon-remove"></i></span>
								</if></td>
								<td>
									<div class="btn-group btn-group-xs">
									 <a class="btn btn-primary" href="{:U('Admin/Auth/accessSelect',array('id'=>$vo['id'],'name'=>$vo['title']))}">权限设置</a> 
									 <a class="btn btn-info" href="{:U('Admin/Auth/groupMember',array('id'=>$vo['id'],'name'=>$vo['title']))}">成员管理</a> <a class="btn btn-warning" href="#">修改</a> <a class="btn btn-danger" href="#">删除</a>
									 
									</div>
								</td>
			  			</tr>
			  		</volist>
			  		<tr>
						<td colspan='5'>{$page}</td>
					</tr>
			  	</table>

			  </div>
			  <div class="tab-pane fade" id="groupAdd">
			  	<form class="form-horizontal" action="{:U('Admin/Auth/groupAddHandle')}" method='post'>
						<div class="form-group">
							<label for="groupName" class="col-sm-2 control-label">角色名称:</label>
							<div class="col-sm-5">
								<input type="text" class="form-control" placeholder="角色名称" name="groupName" id="groupName" />
							</div>
							<label class="col-sm-2 control-label"></label>
						</div>						

						<div class="form-group">
							<label for="describe" class="col-sm-2 control-label">角色描述:</label>
							<div class="col-sm-5">
								<input type="text" class="form-control" placeholder="角色描述" name="describe" id="describe" />
							</div>
							<label class="col-sm-2 control-label"></label>
						</div>						

						<div class="form-group">
							<label class="col-sm-2 control-label">是否启用:</label>
							<div class="btn-group col-sm-5" data-toggle="buttons">
								<label class="btn btn-primary">
									<input type="radio"  name="status" id="status" checked="checked" value="1" />启用
								</label>

								<label class="btn btn-danger">
									<input type="radio"  name="status" id="status" value="0" />禁用
								</label>
							</div>
							<label class="col-sm-2 control-label"></label>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-5">
								<button type="submit" class="btn btn-success btn-add">添加</button>
								
							</div>
							
						</div>

					</form>

			  </div>
			</div>
		</div>
</block>

